home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20000824-20010305
/
000366_news@columbia.edu _Tue Feb 27 10:46:36 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2001-03-05
|
3KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id KAA04322
for <kermit.misc@cpunix.cc.columbia.edu>; Tue, 27 Feb 2001 10:46:36 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA14481
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 27 Feb 2001 10:46:35 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id KAA25197
for kermit.misc@watsun.cc.columbia.edu; Tue, 27 Feb 2001 10:19:06 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@columbia.edu (Frank da Cruz)
Subject: Re: FTP scripting...
Date: 27 Feb 2001 15:19:06 GMT
Organization: Columbia University
Message-ID: <97ggha$oja$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <9qve79.57d.ln@twocups.sirinet.net>,
Bud Rogers <budr@sirinet.net> wrote:
: Josef Moellers wrote:
: > Bud Rogers wrote:
: >> Expect was designed to handle tasks like that.
: ...
: budr@twocups:~$ autoexpect telnet localhost
: ...
: Now script.exp is an expect script that will exactly replay that online
: session from login to logout. Then you can add control statements to
: alter the flow of the script, handle errors, whatever.
:
Expect is a fine tool that can be used to automate interactive procedures
that can't be automated any other way. For FTP it's better than .netrc
because it allows some measure of decision making.
But it's not as good as an FTP client that has its own built-in scripting
language. Why? Because it is driven entirely by whatever text happens to
appear on the screen. It can't tell whether text is from the FTP client
or the server or (in the example above) the shell or the Telnet client.
There is no connection between the scripting language and the FTP protocol.
A script based on messages will stop working as soon as any of the
messages changes. You're likely to need a different script for every FTP
client/server pair.
Plus an Expect/FTP script is limited by the feature set of the FTP client.
Can you use Expect to force your FTP client to:
. Make secure connections to a secure FTP server?
. Translate character sets?
. Automatically switch between text and binary mode for each file?
. Traverse directory trees?
. Select files based on date and/or size?
. Handle filename collisions automatically?
. Preserve file dates or permissions?
. Execute update or recovery procedures?
Probably not. But the new Kermit FTP client:
http://www.columbia.edu/kermit/ftpclient.html
can do all this in a very simple, straightforward way that can be
scripted easily and robustly. See the tutorial here:
http://www.columbia.edu/kermit/ftpscript.html
- Frank